# -*- coding UTF-8 -*-
#:import DisableableButton ui.disableable_button.DisableableButton
#import FittableButton ui.fittable_widgets.FittableButton
#import FittableLabel ui.fittable_widgets.FittableLabel
#import FittableTextInput ui.fittable_widgets.FittableTextInput
<EditPlayers>:
    players_list: players_list
    next_button: next_button
    orientation: 'vertical'
    BoxLayout:
        size_hint_y: None
        height: root.height * 0.1
        orientation: 'horizontal'
        FittableButton:
            color_name: 'red'
            text: _('Back')
            on_release: root.go_back()
        DisableableButton:
            id: next_button
            color_name: 'green'
            text: _('Next')
            on_release: root.next_screen()
    ScrollView:
        do_scroll_x: False
        size_hint_y: 1
        GridLayout:
            id: players_list
            size_hint_y: None
            cols: 1

<PlayerListElement>:
    #size_hint_y: None
    #height: self.root.width*0.15
    text_input: text_input
    orientation: 'horizontal'
    FittableTextInput:
        id: text_input
        text: root.player.name
        font_size: self.height*0.6
        width: root.root.width
        on_text_validate: root.root.change_line(root.idx)
        on_text: root.change_name(self.text)
        multiline: False
